package com.liuqi.iot.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.liuqi.common.base.domain.entity.BaseEntity;
import com.liuqi.iot.bean.dto.DeviceModelFieldDTO;
import lombok.Data;

import java.util.List;

/**
 * 设备模型发布结果表
 *
 * @author  LiuQi 2025/3/22-16:52
 * @version V1.0
 **/
@Data
@TableName(value = "t_device_model_published", autoResultMap = true)
public class DeviceModelPublishedEntity extends BaseEntity {
    /**
     * 模型编码
     */
    private String code;

    /**
     * 模型名称
     */
    private String name;

    /**
     * 当前版本
     */
    private Integer version;

    /**
     * 离线检测周期，秒
     */
    private Integer offlineDetection;

    /**
     * 模型字段列表
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<DeviceModelFieldDTO> fields;
}
